<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../jquery.min.js"></script>
    <script src="./axios.min.js"></script>
</head>

<body>
    <button class="btn">click</button>
    <input type="text" placeholder="bookname" class="bookname">
    <input type="text" placeholder="author" class="author">
    <input type="text" placeholder="publisher" class="publisher">
    <script>
        $('.btn').click(() => {
            let bookname = $('.bookname').val()
            let author = $('.author').val()
            let publisher = $('.publisher').val()
            console.log(`http://localhost:3000?bookname=${bookname}&author=${author}&publisher=${publisher}`)

            fetch(`http://localhost:3000?bookname=${bookname}&author=${author}&publisher=${publisher}`).then(res => res.json())
                .then(res => console.log(res))

            /*  $.ajax({
                 url: 'http://localhost:3000',
                 type: 'post',
                 data: {
                     name: 'zs'
                 },
                 success: (res) => {
                     console.log(res)
                 }
             }) */

        })
    </script>
</body>

</html>